package model;

public class Sip extends Model {

	//GENERAL
	//private String context;
	private String bindPort;
	private String bindAddr;
	private String tos_sip;
	private String tos_audio;
	private String tos_video;
	private String videoSupport;
	private String videoSupportGUI;
	private String t38pt_udptl;
	private String t38pt_udptlGUI;
	private String allow;
	private String limitOnPeers;
	private String limitOnPeersGUI;
	
	//ESPECÍFICOS
	private String callerId;
	private String type;
	private String userName;
	private String secret;
	private String canReInvite;
	private String canReInviteGUI;
	private String host;
	private String context;
	private String dtmfMode;
	private String callLimit;
	private String nat;
	private String natGUI;
	
	public String getCallerId() {
		return callerId;
	}
	public void setCallerId(String callerId) {
		this.callerId = callerId;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getSecret() {
		return secret;
	}
	public void setSecret(String secret) {
		this.secret = secret;
	}
	public String getCanReInvite() {
		return canReInvite;
	}
	public void setCanReInvite(String canReInvite) {
		this.canReInvite = canReInvite;
	}
	public String getHost() {
		return host;
	}
	public void setHost(String host) {
		this.host = host;
	}
	public String getContext() {
		return context;
	}
	public void setContext(String context) {
		this.context = context;
	}
	public String getDtmfMode() {
		return dtmfMode;
	}
	public void setDtmfMode(String dtmfMode) {
		this.dtmfMode = dtmfMode;
	}
	public String getCallLimit() {
		return callLimit;
	}
	public void setCallLimit(String callLimit) {
		this.callLimit = callLimit;
	}
	public String getNat() {
		return nat;
	}
	public void setNat(String nat) {
		this.nat = nat;
	}
	public String getCanReInviteGUI() {
		
		if (this.canReInvite != null && this.canReInvite.matches("yes")) {
			this.canReInviteGUI = "checked";
		} else {
			this.canReInviteGUI = "";
		}
		
		return this.canReInviteGUI;
	}
	public void setCanReInviteGUI(String canReInviteGUI) {
		
		if (canReInviteGUI.matches("on")) {
			this.setCanReInvite("yes");
		} else {
			this.setCanReInvite("no");
		}
		
		this.canReInviteGUI = canReInviteGUI;
	}
	public String getNatGUI() {
		
		if (this.nat != null && this.nat.matches("yes")) {
			this.natGUI = "checked";
		} else {
			this.natGUI = "";
		}
		
		return this.natGUI;
	}
	public void setNatGUI(String natGUI) {
		
		if (natGUI.matches("on")) {
			this.setNat("yes");
		} else {
			this.setNat("no");
		}
		
		this.natGUI = natGUI;
	}
	public String getBindPort() {
		return bindPort;
	}
	public void setBindPort(String bindPort) {
		this.bindPort = bindPort;
	}
	public String getBindAddr() {
		return bindAddr;
	}
	public void setBindAddr(String bindAddr) {
		this.bindAddr = bindAddr;
	}
	public String getVideoSupport() {
		return videoSupport;
	}
	public void setVideoSupport(String videoSupport) {
		this.videoSupport = videoSupport;
	}
	public String getAllow() {
		return allow;
	}
	public void setAllow(String allow) {
		this.allow = allow;
	}
	public String getLimitOnPeers() {
		return limitOnPeers;
	}
	public void setLimitOnPeers(String limitOnPeers) {
		this.limitOnPeers = limitOnPeers;
	}
	public String getTos_sip() {
		return tos_sip;
	}
	public void setTos_sip(String tos_sip) {
		this.tos_sip = tos_sip;
	}
	public String getTos_audio() {
		return tos_audio;
	}
	public void setTos_audio(String tos_audio) {
		this.tos_audio = tos_audio;
	}
	public String getTos_video() {
		return tos_video;
	}
	public void setTos_video(String tos_video) {
		this.tos_video = tos_video;
	}
	public String getT38pt_udptl() {
		return t38pt_udptl;
	}
	public void setT38pt_udptl(String t38pt_udptl) {
		this.t38pt_udptl = t38pt_udptl;
	}
	public String getVideoSupportGUI() {
		
		if (this.videoSupport != null && this.videoSupport.matches("yes")) {
			this.videoSupportGUI = "checked";
		} else {
			this.videoSupportGUI = "";
		}
		
		return this.videoSupportGUI;
	}
		
	public void setVideoSupportGUI(String videoSupportGUI) {
		
		if (videoSupportGUI.matches("on")) {
			this.setVideoSupport("yes");
		} else {
			this.setVideoSupport("no");
		}
		
		this.videoSupportGUI = videoSupportGUI;
	}
	public String getT38pt_udptlGUI() {
		
		if (this.t38pt_udptl != null && this.t38pt_udptl.matches("yes")) {
			this.t38pt_udptlGUI = "checked";
		} else {
			this.t38pt_udptlGUI = "";
		}
		
		return this.t38pt_udptlGUI;
	}
	public void setT38pt_udptlGUI(String t38pt_udptlGUI) {
		
		if (t38pt_udptlGUI.matches("on")) {
			this.setT38pt_udptl("yes");
		} else {
			this.setT38pt_udptl("no");
		}
		
		this.t38pt_udptlGUI = t38pt_udptlGUI;
	}
	public String getLimitOnPeersGUI() {
		
		if (this.limitOnPeers != null && this.limitOnPeers.matches("yes")) {
			this.limitOnPeersGUI = "checked";
		} else {
			this.limitOnPeersGUI = "";
		}
		
		return this.limitOnPeersGUI;
	}
	public void setLimitOnPeersGUI(String limitOnPeersGUI) {
		
		if (limitOnPeersGUI.matches("on")) {
			this.setLimitOnPeers("yes");
		} else {
			this.setLimitOnPeers("no");
		}
		
		this.limitOnPeersGUI = limitOnPeersGUI;
	}
}
